/** ***********************************************
 * CodeGen
 *
 * @author  Jonnie Spratley
 * @date 3/05/2009
 * @licence MCIYC
 * @website http://jonniespratley.com/code
 * @contact jonniespratley@gmail.com
 *********************************************** */
package com.jonniespratley.codegen.vo
{
	[Bindable]
	public class ConfigVO
	{
		public var aHost:String;
		public var aUser:String;
		public var aPass:String;
		public var aDatabase:String;
		public var aApplication:String;
		public var aNamespace:String;
		public var aEndpoint:String;
		public var aCopywrite:String;
		public var aFramework:String;
		public var aLocation:String;
		public var aPath:String;
		public var aTablesAndFields:Array;
		



		public function  ConfigVO( obj:Object = null )
		{
			if ( obj != null )
			{
				this.aHost = obj['host'];
				this.aUser = obj['username'];
				this.aPass = obj['password'];
				this.aDatabase = obj['database'];
				this.aApplication = obj['application'];
				this.aNamespace = obj['namespace'];
				this.aEndpoint = obj['endpoint'];
				this.aFramework = obj['framework'];
				this.aCopywrite = obj['copywrite'];
				this.aLocation = obj['location'];
				this.aPath = obj['path'];
				this.aTablesAndFields = obj['tables'] as Array;

			}
		}

		public function get label():String
		{
			return 'Config';
		}

		public function get children():Array
		{
			var cArray:Array = [
				/* { label: aHost, data: aHost, icon: nodeIcon },
				{ label: aUser, data: aUser, icon: nodeIcon },
				{ label: aPass, data: aPass, icon: nodeIcon },
				{ label: aDatabase, data: aDatabase, icon: nodeIcon },
				{ label: aApplication, data: aApplication, icon: nodeIcon },
				{ label: aNamespace, data: aNamespace, icon: nodeIcon },
				{ label: aEndpoint, data: aEndpoint, icon: nodeIcon } */
			 ];

			return cArray;
		}


	}
}